package com.wyu.service;

import com.wyu.dao.SCDao;
import com.wyu.dao.SCDaoImpl;
import com.wyu.pojo.SC;

import java.util.List;

public class SCServiceImpl implements SCService {
    SCDao dao = new SCDaoImpl();
    @Override
    public List<SC> selectByXSpage(String page, String limit) {
        int count = Integer.parseInt(limit);
        int start = (Integer.parseInt(page)-1)*count;
        List<SC> list = dao.selectBypage(start,count);
        return list;
    }

    @Override
    public int getCount() {
        return dao.selectByCount();
    }
}
